<%@ include file="/WEB-INF/include/base.jsp" %>
<%@ include file="/WEB-INF/include/user.jsp" %>
<%@ include file="/WEB-INF/include/initialize_logged.jsp" %>
<%@ page isELIgnored="false" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="./common/css/master.css"/>
</head>
<body>	
	<table id="page">
		<com:header>
			This is a header
		</com:header>
		<com:subheader>
			<com:sub_h_item label="Home" action="${path }/Welcome.do"/>
			<com:sub_h_item label="Sign up" action="${path }/SignupPage.do"/>
			<com:sub_h_item label="Log in" action="${path }/LoginPage.do"/>			
		</com:subheader>		
		<com:main_nav>
			<com:nav_item label="Home" action="${path }/Welcome.do" active="true"/>				
			<com:nav_item label="Flights" action="${path }/Flights.do"/>
			<com:nav_item label="About Us" action="${path }/About Us.do"/>
			<com:nav_item label="Contact Us" action="${path }/Contact Us.do"/>
		</com:main_nav>
		<com:content>
			<table>				
				<tr>
					<td id="sidebar">
						<a href="${path }/Welcome.do">Back to Home</a>
					</td>
					<td id="content_i">
						<html:form action="/Login.do">						
						<login:form heading="Log in">
							<login:error_h>
								<html:messages id="errors" message="true" property="errorLogin">
									<com:error_m>
										<c:out value="${errors }"/>
									</com:error_m>									
								</html:messages>										
								<html:messages id="errors" message="true" property="invalidLogin">
									<c:out value="${errors }"/>
								</html:messages>
								<html:messages id="errors" message="true" property="userDatabase">
									<c:out value="${errors }"/>
								</html:messages>
								<html:messages id="errors" message="true" property="cancelLogin">
									<com:error_m>
										<c:out value="${errors }"/>
									</com:error_m>									
								</html:messages>						
							</login:error_h>								
							<login:username label="E-mail address">
								<html:text property="emailAddress" value="test1@email.com"/>
							</login:username>
							<login:error>
								<html:messages id="errors" message="true" property="emailAddress">
									<c:out value="${errors }"/>
								</html:messages>
							</login:error>
							<login:password label="Password">
								<html:password property="password" value="password"/>
							</login:password>
							<login:error>
								<html:messages id="errors" message="true" property="password">
									<c:out value="${errors }"/>
								</html:messages>
							</login:error>
							<login:command>
								<html:cancel value="Cancel"/>
								<html:submit value="Log in"/>								
							</login:command>
						</login:form>
						</html:form>
					</td>
					<td>&nbsp;</td>
				</tr>
			</table>				
		</com:content>
		<com:footer>
			This is a footer
		</com:footer>
	</table>
</body>
</html>